<%
var content_board = '<div class="form-group clearfix col-xs-12"><select name="board_id" class="js-move-change-list col-xs-12 form-control input-sm cur">';
var content_position = '<div class="form-group clearfix col-xs-12"><select name="list_id" id="list_position" class="js-move-change-position col-xs-12 form-control input-sm cur">';
boards.each(function(board) {
	if (list.attributes.board_id == board.id) {
		var board_lists = new App.ListCollection();
		board_lists.reset(board.lists.where({is_archived: 0}));
		board_lists.sortByColumn('position');
		content_board += '<option value="' + board.id + '" selected="selected">' + _.escape(board.attributes.name) + ' '+ i18next.t('(current)')+'</option>';
		 var i = 1;
		 board_lists.each(function(lists) {
			if (lists.attributes.position == list.attributes.position) {			
				content_position += '<option value="' + i + '" selected="selected">' + i + ' '+i18next.t('(current)')+'</option>';
			} else {
				content_position += '<option value="' + i + '">' + i+ '</option>';
			}
			i = i +1;
		});
		if (list.attributes.board_id != board.attributes.id) {
			var list_count = board.lists.where({is_archived: 0}).length;
			var next_position = parseInt(list_count) + 1;
			content_position += '<option value="' + next_position + '">' + next_position+ '</option>';
		}
	} else {
		if (parseInt(board.attributes.is_closed) === 0) {
			content_board += '<option value="' + board.id + '">' + _.escape(board.attributes.name) + '</option>';
		}
	}
});
content_board += '</select></div>';
content_position += '</select></div>';
var content = content_board + content_position;
%>
<div class="clearfix text-center col-xs-12"><a data-list-id="268" class="js-back-to-list-actions pull-left" href="#"><i class="icon-caret-left"></i></a><span class="col-xs-10"><strong><%- i18next.t('Move List') %></strong></span><a class="js-close-popup pull-right" href="#"><i class="icon-remove"></i></a></div><div class="col-xs-12 divider"></div>
<form role="form" class="js-move-list" name="MoveListForm" id="MoveListForm">
<%= content %>
  <div class="form-group clearfix panel-body">
	<label class="sr-only"><%- i18next.t('Move') %></label>
	<input type="submit" id="submitListMove" class="btn btn-primary col-xs-12" value="<%- i18next.t('Move') %>" />
  </div>
</form>